package no.ntnu.idi.deid.preprocessor;

import no.ntnu.idi.deid.documentunits.Token;
import no.ntnu.idi.deid.preprocessor.postagger.POSTag;

public class PreRuleBase {
	
	private PreRuleBase(){
		
	}

	/*
	 * Konjuksjoner
	 * 
	 * 
	 * 
	 */
	
	public static void prepareToken(Token t){
		//POSTAG-CHECKS
		checkPreposition(t);
		checkConjunction(t);
		checkPron(t);
		checkSubj(t);
		checkDet(t);
		checkInter(t);
		checkInfm(t);
	}
	
	
	private static void checkPreposition(Token token) {
		if(token.getPOSTag() == POSTag.PREP){
			token.setSensetivityTag(false);
		}
	}
	
	private static void checkConjunction(Token token) {
		if(token.getPOSTag() == POSTag.KONJ){
			token.setSensetivityTag(false);
		}
	}
	
	private static void checkPron(Token token) {
		if(token.getPOSTag() == POSTag.PRON){
			token.setSensetivityTag(false);
		}
	}
	
	private static void checkSubj(Token token) {
		if(token.getPOSTag() == POSTag.SUBJ){
			token.setSensetivityTag(false);
		}
	}
	
	private static void checkDet(Token token) {
		if(token.getPOSTag() == POSTag.DET){
			token.setSensetivityTag(false);
		}
	}
	
	private static void checkInter(Token token) {
		if(token.getPOSTag() == POSTag.INTERJ){
			token.setSensetivityTag(false);
		}
	}
	
	private static void checkInfm(Token token) {
		if(token.getPOSTag() == POSTag.INFM){
			token.setSensetivityTag(false);
		}
	}
}
